home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / uother__ / drh310e.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1996-09-26  |  5KB  |  180 lines

  1. @echo off
  2. cls
  3. echo  ************************* DR.HARDWARE SYSINFO **************************
  4. echo                                                                           
  5. echo                        Installation onto Hard disk                       
  6. echo                                                                           
  7. echo                                                                           
  8. echo    Please press any key if you want to install DR. HARDWARE         
  9. if "%1" == ""  goto INSTFIRSTHD
  10. if "%1" == "c:" goto INST
  11. if "%1" == "d:" goto INST
  12. if "%1" == "e:" goto INST
  13. if "%1" == "f:" goto INST
  14. if "%1" == "g:" goto INST
  15. if "%1" == "h:" goto INST
  16. if "%1" == "i:" goto INST
  17. if "%1" == "j:" goto INST
  18. if "%1" == "k:" goto INST
  19. if "%1" == "l:" goto INST
  20. if "%1" == "m:" goto INST
  21. if "%1" == "n:" goto INST
  22. if "%1" == "o:" goto INST
  23. if "%1" == "p:" goto INST
  24. if "%1" == "q:" goto INST
  25. if "%1" == "r:" goto INST
  26. if "%1" == "s:" goto INST
  27. if "%1" == "t:" goto INST
  28. if "%1" == "u:" goto INST
  29. if "%1" == "v:" goto INST
  30. if "%1" == "w:" goto INST
  31. if "%1" == "x:" goto INST
  32. if "%1" == "y:" goto INST
  33. if "%1" == "z:" goto INST
  34. goto INSTFIRSTHD
  35.  
  36. :INSTFIRSTHD
  37. echo    into the directory \DRHARD on drive C:\.    
  38. echo                                                                            
  39. echo      Note:                                                              
  40. echo      Additional command line parameters allow you to determine the        
  41. echo      target drive and directory by your own.             
  42. echo      Syntax :   INSTALL X: Directory name                                  
  43. echo      Examples:  
  44. echo      [INSTALL D: TEST] Installs the program in directory "TEST" on D:\   
  45. echo      [INSTALL E:]      Installs the program in the default directory
  46. echo                        \DRHARD on drive E:\  
  47. goto LETSGO
  48.  
  49. :INST
  50. if "%2" == "" goto NODIR
  51. echo    into directory \%2 on drive %1.         
  52. goto LETSGO
  53.  
  54. :NODIR
  55. echo    into directory \DRHARD on drive %1.     
  56. goto LETSGO
  57.  
  58. :LETSGO
  59. echo                                                                           
  60. echo    Press CTRL+C to quit installation now.  
  61. echo                                                                           
  62. echo  ************************************************************************
  63. PAUSE >NUL
  64. cls
  65. if "%1" == "" goto INSTTOC
  66. if "%2" == "" goto INSTSTDDIR
  67. md %1\%2
  68. if not exist %1\%2\drhard.exe goto LETSCOPY
  69. cls
  70. echo !!Warning!! 
  71. echo The target directory contains a file named DRHARD.EXE.
  72. echo Note that elder program files would be overwritten now.
  73. echo To abort installation now press CTRL+C.
  74. pause >nul
  75. goto LETSCOPY
  76.  
  77. :LETSCOPY
  78. rem if errorlevel 4 goto ERRMESSAGE
  79. rem if errorlevel 1 goto ERRMESSAGE
  80. echo Copying...
  81. copy drhard.*  %1\%2        >nul
  82. copy drharde.* %1\%2  >nul
  83. copy *.txt %1\%2         >nul
  84. copy file_id.diz %1\%2        >nul
  85. copy *.frm %1\%2        >nul
  86. rem copy comparis.dat %1\%2 >nul
  87. copy user.dat %1\%2 >nul
  88. copy readme.bat %1\%2     >nul
  89. goto ENDMESSAGE
  90.  
  91. :INSTSTDDIR
  92. md %1\DRHARD             >nul
  93. if not exist %1\drhard\drhard.exe goto CPYSTDDIR
  94. cls
  95. echo !!Warning!!
  96. echo The target directory contains a file named DRHARD.EXE.
  97. echo Note that elder program files would be overwritten now.
  98. echo To abort installation now press CTRL+C.
  99. echo Abbruch mit STRG+C bzw. CTRL+C.
  100. pause >nul
  101. goto CPYSTDDIR
  102.  
  103. :CPYSTDDIR
  104. rem if errorlevel 4 goto ERRMESSAGE
  105. rem if errorlevel 1 goto ERRMESSAGE
  106. echo Copying...
  107. copy drhard.*  %1\DRHARD    >nul
  108. copy drharde.* %1\DRHARD >nul
  109. copy *.txt %1\drhard         >nul
  110. copy file_id.diz %1\drhard    >nul
  111. copy *.frm %1\drhard    >nul
  112. rem copy comparis.dat %1\drhard >nul
  113. copy user.dat %1\drhard >nul
  114. copy readme.bat %1\drhard    >nul
  115. goto ENDMESSAGE
  116.  
  117. :INSTTOC
  118. md c:\drhard
  119. if not exist c:\drhard\drhard.exe goto CPYTOC
  120. cls
  121. echo !!Warning!!
  122. echo The target directory contains a file named DRHARD.EXE.
  123. echo Note that elder program files would be overwritten now.
  124. echo To abort installation now press CTRL+C.
  125. pause >nul
  126. goto CPYTOC
  127.  
  128. :CPYTOC
  129. echo Copying ...
  130. copy drhard.* c:\drhard >nul
  131. copy drharde.* c:\drhard >nul
  132. copy *.txt c:\drhard         >nul
  133. copy file_id.diz c:\drhard     >nul
  134. copy *.frm c:\drhard     >nul
  135. rem copy comparis.dat c:\drhard >nul
  136. copy user.dat c:\drhard >nul
  137. copy readme.bat c:\drhard      >nul
  138. goto ENDMESSAGE
  139.  
  140. :ERRMESSAGE
  141. cls
  142. echo  **************************************
  143. echo    Input error - define drive again!!!
  144. echo    Any key...
  145. echo  **************************************
  146. goto END
  147.  
  148. :ENDMESSAGE
  149. echo  
  150. echo  ********************************************************
  151. echo     Installation completed!
  152. echo   
  153. echo     Start the program by switching to the program directory
  154. if "%1"=="" goto STARTSTD
  155. if "%2"=="" goto STARTDRV
  156. goto STARTDIRDRV
  157.  
  158. :STARTSTD
  159. echo     C:\. Enter: [cd drhard]
  160. goto STARTEXE
  161.  
  162. :STARTDRV
  163. echo     %1\. Enter: [cd drhard]
  164. goto STARTEXE
  165.  
  166. :STARTDIRDRV
  167. echo     %1\. Enter: [cd %2]
  168. goto STARTEXE
  169.  
  170. :STARTEXE
  171. echo     ...and then load the EXE file...
  172. echo     Enter: [drhard]
  173. echo      
  174. echo     Press any key...
  175. echo  ********************************************************
  176. goto END
  177.  
  178. :END
  179. pause >nul
  180. echo on